
#pragma once

#include "lmx2572.h"

#ifdef __cplusplus
extern "C"
{
#endif

#define CONFIG_XTAL 24 // 24.576

    typedef struct
    {
        double freq_min;                // 频段最小值 单位：M
        double freq_max;                // 频段最大值 单位：M
        uint16_t frequency_coefficient; // 分频系数
        uint8_t reg_value;              // 写入寄存器该位置的值
    } lmx2575_frequency_table_tx_t;

    /**
     * @brief Initialize radio
     *
     * @return esp_err_t Initialize state
     */
    uint8_t bsp_radio_tx_init(void);
    // uint8_t bsp_radio_rx_reinit(void);
    uint8_t bsp_radio_tx_freq_set(double freq);
    void bsp_radio_tx_sleep_44(uint8_t ONorOFF);
    void bsp_radio_tx_sleep_0_tets(uint8_t ONorOFF);
    uint8_t bsp_radio_tx_pll_check(void);
  
#ifdef __cplusplus
}
#endif
